<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
		<!-- <script src="https://unpkg.com/vue@next"></script> -->
		<script src="js/v2.6.10/vue.js" type="text/javascript" charset="utf-8"></script>
	</head>
		<body>
		   
		     <style>
		       ul {
		         margin: 0;
		         padding: 0;
		       }
		   
		       li {
		         list-style-type: none;
		         display: inline-block;
		         margin-right: 10px;
		         padding: 20px;
		         background-color: wheat;
		       }
		   
		       .red {
		         background-color: red;
		         color: wheat;
		       }
		     </style>
		   </head>
		   <body>
		     <div id="app">
		       <ul>
		         <li v-for="A,index in list" :class="index == select ? 'red' : ''" @click="select=index">{{A}}</li>
		       </ul>
		     </div>
		     <script>
		       new Vue({
		         el: "#app",
		         data: {
		           list: ['1', '2', '3', '4'],
		           select: 0
		         },
		   
		         methods: {
		   
		         }
		       })
		     </script>
	</body>
</html>
